/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package com.googlecode.ivybeans.module.options;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JComponent;
import org.netbeans.spi.options.OptionsPanelController;
import org.openide.util.HelpCtx;
import org.openide.util.Lookup;

/**
 *
 * @author lforet
 */
public class IvyOptionsPanelController extends OptionsPanelController {

    PropertyChangeSupport pcs = new PropertyChangeSupport(this);

    private IvyAdvancedOption ivyOptions;
    
    public IvyOptionsPanelController(IvyAdvancedOption ivyOptions) {
        this.ivyOptions = ivyOptions;
    }
    
    @Override
    public void addPropertyChangeListener(PropertyChangeListener l) {
        pcs.addPropertyChangeListener(l);
    }

    @Override
    public void applyChanges() {
        Logger.getLogger(this.getClass().getName()).log(Level.FINE,"Not supported yet.");
    }

    @Override
    public void cancel() {
        Logger.getLogger(this.getClass().getName()).log(Level.FINE,"Not supported yet.");
    }

    @Override
    public JComponent getComponent(Lookup masterLookup) {
        return new IvyOptionPanel(ivyOptions);
    }

    @Override
    public HelpCtx getHelpCtx() {
        return HelpCtx.DEFAULT_HELP;
    }

    @Override
    public boolean isChanged() {
        Logger.getLogger(this.getClass().getName()).log(Level.FINE,"Not supported yet.");
        return false;
    }

    @Override
    public boolean isValid() {
        Logger.getLogger(this.getClass().getName()).log(Level.FINE,"Not supported yet.");
        return true;
    }

    @Override
    public void removePropertyChangeListener(PropertyChangeListener l) {
        pcs.removePropertyChangeListener(l);
    }

    @Override
    public void update() {
        Logger.getLogger(this.getClass().getName()).log(Level.FINE,"Not supported yet.");
    }

}
